/*
 * Copyright © 2016 Cask Data, Inc.
 *
 * Licensed under the Apache License, Version 2.0 (the "License"); you may not
 * use this file except in compliance with the License. You may obtain a copy of
 * the License at
 *
 * http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
 * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
 * License for the specific language governing permissions and limitations under
 * the License.
 */

@font-color: #333333;
@cdap-orange: #ff6600;
@svg-background: #e8e8e8;
@border-color: #cccccc;

my-top-entity-graph {
  width: 100%;
  height: 100%;

  .graph-container { overflow: hidden; }
  .top-entity-container {
    .sidebar {
      background-color: white;
      position: absolute;
      border-radius: 3px 0 0 3px;
      border: 1px solid @border-color;

      .app-link,
      .entity-link {
        position: absolute;
        overflow: hidden;
        text-overflow: ellipsis;
        white-space: nowrap;
        font-weight: 400;
      }

      .app-link {
        left: 0;
        max-width: 90px;
        color: #aaaaaa;
        font-size: 10px;
        margin-left: 15px;
        text-align: left;
      }

      .entity-link {
        font-size: 12px;
        left: 0;
        font-weight: 600;
        color: @font-color;
        transform: translateY(-50%);
        letter-spacing: 0.5px;
        margin-left: 10px;
        max-width: 110px;
        text-align: left;

        &:hover {
          text-decoration: none;
        }
      }
    }

    svg {
      background-color: @svg-background;
      border: 1px solid @border-color;
      border-radius: 3px;
    }

    .axis {
      path,
      line {
        fill: none;
        stroke: @border-color;
        shape-rendering: crispEdges;
      }

      text {
        font-weight: 500;
        font-size: 12px;
        fill: @font-color;
      }

      &.y {
        path,
        line { display: none; }
      }
    }
  }
}

my-top-entity-graph[type=applications] .bar {
  fill: #2c3e50;
}

my-top-entity-graph[type=programs] .bar {
  fill: #29b19f;
}
